package View;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.Toolkit;

import javax.swing.*;

public class User extends JFrame{

    JTabbedPane tabpane;
    public User(String name) {

        setTitle("租书店管理系统");
        setSize(1000, 800);
        setLocationRelativeTo(null);
        Toolkit t =Toolkit.getDefaultToolkit();





        Container c = getContentPane();
        tabpane = new JTabbedPane(JTabbedPane.TOP,JTabbedPane.SCROLL_TAB_LAYOUT);
        c.add(tabpane, BorderLayout.CENTER);


        tabpane.setFont(new Font("宋体",Font.BOLD,18));
        tabpane.setBackground(new Color(51,153,255));


        /*搜索图书界面*/
        SearchBook sb = new SearchBook();
        sb.setName(name);
        tabpane.addTab("图书查阅", sb.laypane);

        /*借阅历史界面*/
        BorrowHistory bh = new BorrowHistory();
        bh.setName(name);
        bh.setPanel();
        sb.setModel(bh.model);
        tabpane.addTab("借阅历史", bh.laypane);

        /*修改信息界面*/
        ChangeInfo ci = new ChangeInfo();
        ci.setName(name);
        tabpane.addTab("修改信息", ci.panel);



        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }





}






